﻿<UserControl x:Class="MoreEPG.View.CustomDialogBox"
             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
             xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
             xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"            
             mc:Ignorable="d"
             DataContext="{Binding Main, Source={StaticResource Locator}}" 
             Background="#40000000"  >
    <UserControl.Resources>
        <ResourceDictionary>
            <ResourceDictionary.MergedDictionaries>
                <ResourceDictionary Source="../Skins/MainSkin.xaml" />
            </ResourceDictionary.MergedDictionaries>
        </ResourceDictionary>
    </UserControl.Resources>
    <Grid HorizontalAlignment="Center" VerticalAlignment="Center">
        <Grid.RowDefinitions>
            <RowDefinition Height="Auto" />
            <RowDefinition Height="Auto" />
        </Grid.RowDefinitions>
        <Border  Background="{StaticResource DarkBackground}" CornerRadius="12" Grid.RowSpan="2"/>
        <StackPanel Grid.Row="0" Margin="12" HorizontalAlignment="Center" VerticalAlignment="Center" Orientation="Horizontal">
            <Image Source="{Binding Image,Converter={StaticResource ImageConverter}}" Height="32" Width="32"></Image>
            <TextBlock Margin="10" FontWeight="Bold" VerticalAlignment="Center" HorizontalAlignment="Center" Foreground="White" FontSize="14" TextAlignment="Center" TextDecorations="None" TextTrimming="WordEllipsis" Text="{Binding InfoText}"></TextBlock>
        </StackPanel>
        <StackPanel Grid.Row="1" Margin="10" HorizontalAlignment="Right" VerticalAlignment="Center" Orientation="Horizontal">
            <Button Template="{DynamicResource GlassButton}" Foreground="#FFFFFFFF" Content="Cancel" FontWeight="Bold" Height="23" Margin="5" HorizontalAlignment="Right" VerticalAlignment="Center" Width="75" Command="{Binding Cancel}" Visibility="{Binding visibilityCancel,Converter={StaticResource bool2visibilityCol}}"></Button>
            <Button Template="{DynamicResource GlassButton}" Foreground="#FFFFFFFF" Content="Ok" FontWeight="Bold" Height="23" Margin="5" HorizontalAlignment="Right" VerticalAlignment="Center" Width="75" Command="{Binding Ok}" Visibility="{Binding visibilityOk,Converter={StaticResource bool2visibilityCol}}"></Button>
            <Button Template="{DynamicResource GlassButton}" Foreground="#FFFFFFFF" Content="No" FontWeight="Bold" Height="23" Margin="5" HorizontalAlignment="Right" VerticalAlignment="Center" Width="75" Command="{Binding No}" Visibility="{Binding visibilityNo,Converter={StaticResource bool2visibilityCol}}"></Button>
            <Button Template="{DynamicResource GlassButton}" Foreground="#FFFFFFFF" Content="Yes" FontWeight="Bold" Height="23" Margin="5" HorizontalAlignment="Right" VerticalAlignment="Center" Width="75" Command="{Binding Yes}" Visibility="{Binding visibilityYes,Converter={StaticResource bool2visibilityCol}}"></Button>
        </StackPanel>
    </Grid>
</UserControl>